package com.ht.aems.fesservice.handler;

import com.ht.aems.fesmodel.HandlerFactory;
import com.ht.aems.fesmodel.ProtocolHandler;
import org.apache.log4j.Logger;


import java.net.DatagramPacket;

/**
 * Created by IntelliJ IDEA.
 *
 * @author Dong Shufeng
 *         Date: 2007-1-23
 *         Time: 11:20:19
 */
public abstract class AbstractHandler implements ProtocolHandler {

    private int commUnitId = -1;

    public void setCommUnitId(int id) {
        commUnitId = id;
    }

    public int getCommUnitId() {
        return commUnitId;
    }

    public String getProtocolName() {
        return HandlerFactory.getProtocolName(this.getClass());
    }

    public void handle(byte[] data) {
    }

    public void handle(DatagramPacket packet) {
    }
}
